<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('check表格页')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "system/dealreport";
		var purchaseReportId = [[${purchaseReportId}]];
        var datas = [[${@dict.getType('sys_normal_disable')}]];

        $(function() {
            var options = {
                url: prefix + "/listgoods/" + purchaseReportId,
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
				modalName: "商品信息",
				columns: [{
					checkbox: true
				},
					{
						field: 'picturePath',
						title: '图片路径',
						formatter: function(value, row, index) {
							return $.table.imageView(value);
						}
					},
					{
						field: 'name',
						title: '商品名称'
					},
					{
						field: 'barCode',
						title: '商品条码',
						visible: false
					},
					{
						field: 'supplierId',
						title: '供应商号',
						visible: false
					},
					{
						field: 'supplierName',
						title: '供应商名'
					},
					{
						field: 'price',
						title: '价格'
					},
					{
						field: 'inportPrice',
						title: '进价'
					},

					{
						field: 'goodsQuantity',
						title: '上报数量'
					}

				]
			};
			$.table.init(options);
		});
        
        /* 添加用户-选择用户-提交 */
		function submitHandler() {
			var rows = $.table.selectFirstColumns();
			if (rows.length == 0) {
       			$.modal.alertWarning("请至少选择一条记录");
       			return;
       		}
			alert(rows.join());
		}
    </script>
</body>
</html>